package cn.parus.service;

import java.io.IOException;
import java.io.InputStream;

/**
 * @Author: Axel
 * @Description: TODO
 **/
public interface HdfsService {

    /**
     * 上传文件到HDFS，返回的是hdfs路径
     * @param localFilePath
     * @return
     * @throws IOException
     */
    String uploadFileToHDFS(String localFilePath) throws IOException;

    /**
     * 从HDFS下载文件
     * @param hdfsFilePath
     * @throws IOException
     */
    String downloadFileFromHDFS(String hdfsFilePath) throws IOException;

    /**
     * 删除HDFS上的文件或目录
     * @param hdfsFilePath
     * @throws IOException
     */
    void deleteFileOrDirInHDFS(String hdfsFilePath) throws IOException;

    /**
     * 创建HDFS目录
     * @param hdfsDirPath
     * @throws IOException
     */
    void createDirInHDFS(String hdfsDirPath) throws IOException;

}
